<div class="layuimini-container">
    <form id="app-form" class="layui-form layuimini-form">
        <input type="hidden" name="update_time" value="{$row.update_time|default=''}">
        <div class="operate-bar">
            {if auth('roleManager') or $row.appraise==$APPRAISE_NONE}
            <button type="submit" class="layui-btn layui-btn-normal layui-btn-sm" lay-submit>
                {:lang('common.btn_save')}
            </button>
            {/if}
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">{:lang('custom.name')}</label>
            <div class="layui-input-inline layui-form-mid layui-word-aux">{$row.custom_name|default=''}</div>
            <label class="layui-form-label">{:lang('accounting.name')}</label>
            {if auth('roleManager')}
            <div class="layui-input-inline">
                <select name="accounting_id" lay-search lay-verify="required">
                    <option value="">{:lang("common.choose")}{:lang("accounting.name")}</option>
                    {foreach :getAccountingList() as $val}
                    <option value="{$val.id}" {if $val.id==$row.accounting_id}selected{/if}>{$val.name}</option>
                    {/foreach}
                </select>
            </div>
            {else/}
            <div class="layui-input-inline layui-form-mid layui-word-aux">{$row.accounting_name|default=''}</div>
            {/if}
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">{:lang('common.estimate_time')}</label>
            <div class="layui-input-inline">
                <input type="text" name="estimate_time" class="layui-input" lay-verify="onlyNumber"
                       placeholder="{:lang('common.input')}{:lang('common.estimate_time')}"
                       value="{$row.estimate_time|default=''}">
            </div>
            <label class="layui-form-label">{:lang('common.actual_time')}</label>
            <div class="layui-input-inline layui-form-mid layui-word-aux">{$row.actual_time|default=''}</div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label required">{:lang('month.receipt')}</label>
            <div class="layui-input-inline">
                <select name="receipt" lay-verify="required" default-value="{$row.receipt|default=''}"
                        data-select-type="receipt_list">
                </select>
            </div>
            <label class="layui-form-label required">{:lang('month.make_account')}</label>
            <div class="layui-input-inline">
                <select name="make_account" lay-verify="required" default-value="{$row.make_account|default=''}"
                        data-select-type="make_account_list">
                </select>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label required">{:lang('month.report_forms')}</label>
            <div class="layui-input-inline">
                <select name="report_forms" lay-verify="required" default-value="{$row.report_forms|default=''}"
                        data-select-type="report_forms_list">
                </select>
            </div>
            <label class="layui-form-label required">{:lang('month.taxes')}</label>
            <div class="layui-input-inline">
                <select name="taxes" lay-verify="required" default-value="{$row.taxes|default=''}"
                        data-select-type="taxes_list">
                </select>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label required">{:lang('month.voucher_binding')}</label>
            <div class="layui-input-inline">
                <select name="voucher_binding" lay-verify="required" default-value="{$row.voucher_binding|default=''}"
                        data-select-type="voucher_binding_list">
                </select>
            </div>
            <label class="layui-form-label required">{:lang('month.deduction_binding')}</label>
            <div class="layui-input-inline">
                <select name="deduction_binding" default-value="{$row.deduction_binding|default=''}"
                        lay-verify="required" data-select-type="deduction_binding_list">
                </select>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label required">{:lang('month.other')}</label>
            <div class="layui-input-inline">
                <select name="other" lay-verify="required" default-value="{$row.other|default=''}"
                        data-select-type="other_list">
                </select>
            </div>
            {if auth('roleManager')}
            <label class="layui-form-label required">{:lang('common.appraise')}</label>
            <div class="layui-input-inline">
                <select name="appraise" lay-verify="required" default-value="{$row.appraise|default=''}"
                        data-select-type="appraise_list">
                </select>
            </div>
            {/if}
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">{:lang('month.remark')}</label>
            <div class="layui-input-inline w-520">
                <textarea name="remark" class="layui-textarea">{$row.remark|default=''}</textarea>
            </div>
        </div>
    </form>
</div>
<script>
    layui.use(['myCommon'], function () {
        var myCommon = layui.myCommon;
        myCommon.listen();
    });
</script>
